<template>
    <div class="padding15All">
        <div class="info">
            <el-col :span="8">
                <el-descriptions class="margin-top" :colon="false" title="" :column="2">
                    <el-descriptions-item v-if="type=='company'">企业名称</el-descriptions-item>
                    <el-descriptions-item v-if="type=='company'">
                        <span>{{value.contactsEnterpriseName }}</span>
                        <el-button size="mini">工商信息</el-button>
                    </el-descriptions-item>

                    <el-descriptions-item v-if="type=='unit'">姓名</el-descriptions-item>
                    <el-descriptions-item v-if="type=='unit'">{{value.userName }}</el-descriptions-item>

                    <el-descriptions-item v-if="type=='unit'">所在企业</el-descriptions-item>
                    <el-descriptions-item v-if="type=='unit'">{{value.contactsEnterpriseName }}</el-descriptions-item>

                    <el-descriptions-item v-if="type=='unit'">手机号</el-descriptions-item>
                    <el-descriptions-item v-if="type=='unit'">{{value.userPhone }}</el-descriptions-item>

                    <el-descriptions-item>认证状态</el-descriptions-item>
                    <el-descriptions-item v-if="value.authType==1">
                        <i class="el-icon-success" style="color: rgb(7, 181, 113);"></i>
                        <p>已认证</p>
                    </el-descriptions-item>
                    <el-descriptions-item v-if="value.authType == 0">
                            <i class="el-icon-success" style="color: #999;"></i>
                            <p style="color: #999;">未认证</p>
                        </el-descriptions-item>
                    <el-descriptions-item v-if="type=='company'">统一社会信用代码</el-descriptions-item>
                    <el-descriptions-item v-if="type=='company'">{{value.creditCode }}</el-descriptions-item>

                    <el-descriptions-item v-if="type=='company'">法人</el-descriptions-item>
                    <el-descriptions-item v-if="type=='company'">{{value.legalPerson }}</el-descriptions-item>

                    <el-descriptions-item>创建来源</el-descriptions-item>
                    <el-descriptions-item>
                        <p v-if="value.contractName">通过<el-link type="primary" :underline="false">{{value.contractName }}</el-link>添加</p>
                    </el-descriptions-item>

                    <el-descriptions-item>创建时间</el-descriptions-item>
                    <el-descriptions-item>{{value.insertTime }}</el-descriptions-item>
                </el-descriptions>
            </el-col>
        </div>
        <div class="padding15top">
            <slot name="edit"></slot>
        </div>
    </div>
</template>

<script>
export default {
    props:['type',"value"],
}
</script>

<style lang="scss" scoped>
.info{
    border-bottom: 2px solid #e6e6e6;
    padding: 20px;
    overflow: hidden;
}
</style>